<template>
  <el-container id="app" v-loading="loading">
    <el-header height="75px" id="headers">
      <div class="header1 container">
        <Header></Header>
      </div>
    </el-header>
    <router-view v-if="loading2"/>
  </el-container>
</template>

<script>
import Header from "./headerh.vue";
export default {
  name: "app",
  data() {
    return {
      loading: false,
      loading2: false
    };
  },
  components: {
    Header
  },
  async mounted() {
    this.loading = true;
    try {
      await this.$store.dispatch("session");
    } catch (err) {
      console.log(err);
    }
    await this.$store.dispatch("actiontopiccount");
    this.loading = false;
    this.loading2 = true;
  }
};
</script>

<style>
html,
body,
#app {
  height: 100%;
}
</style>


<style lang='scss' scoped>

@media (max-width: 1200px) {
  #headers {
    display: none;
  }
}
</style>
